package com.tt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tt.pojo.Course;
import com.tt.pojo.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CourseMapper extends BaseMapper<Course> {
    @Select("select count(1) from course")
    long findTotal();

    List<Course> findCourseByPage(@Param("start") int start, @Param("size") int size, @Param("name") String name);
    @Delete("delete from course where stud_id = #{id}")
    void deleteCourseById(Long id);
}
